import request from '@/utils/request'

export function findPage(query) {
  return request({
    url: '/category/findPage',
    method: 'get',
    params: query // 继续使用 'params' 来构建查询字符串
  })
}


export function deleteType(categoryId) {
  return request({
    url: '/category/deleteById',
    method: 'get',
    params:{"categoryId":categoryId}//form
  })
}
export function addType(data) {
  return request({
    url: '/category/add',
    method: 'post',
    data//json
  })
}

export function updateType(data) {
  return request({
    url: '/category/updateById',
    method: 'post',
    data//json
  })
}

export function findAllCategoryList(data) {
  return request({
    url: '/category/findAllList',
    method: 'get',
    params:data
  })
}